# Sample Makefile for a anjuta plugin.

# Plugin UI files
python_plugin_uidir = $(anjuta_ui_dir)
python_plugin_ui_DATA =  python_plugin.ui python_plugin_properties.ui

# Plugin Glade file
python_plugin_gladedir = $(anjuta_glade_dir)
python_plugin_glade_DATA =  python_plugin.glade

# Plugin Icon file
python_plugin_pixmapsdir = $(anjuta_image_dir)
python_plugin_pixmaps_DATA = python_plugin.png

# Plugin Python Scripts
scriptsdir = $(bindir)
scripts_SCRIPTS = anjuta-python-autocomplete.py

# Plugin description file
plugin_in_files = python_plugin.plugin.in
%.plugin: %.plugin.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache

python_plugin_plugindir = $(anjuta_plugin_dir)
python_plugin_plugin_DATA = python_plugin.plugin

# NOTE :
# The naming convention is very intentional
# We are forced to use the prefix 'lib' by automake and libtool
#    There is probably a way to avoid it but it is not worth to effort
#    to find out.
# The 'anjuta_' prfix is a safety measure to avoid conflicts where the
#    plugin 'libpython.so' needs to link with the real 'libpython.so'
# Include paths
AM_CPPFLAGS = \
	-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
	-DANJUTA_DATA_DIR=\"$(anjuta_data_dir)\" \
	-DANJUTA_PLUGIN_DIR=\"$(anjuta_plugin_dir)\" \
	-DANJUTA_IMAGE_DIR=\"$(anjuta_image_dir)\" \
	-DANJUTA_GLADE_DIR=\"$(anjuta_glade_dir)\" \
	-DANJUTA_UI_DIR=\"$(anjuta_ui_dir)\" \
	-DPACKAGE_DATA_DIR=\"$(datadir)\" \
	-DPACKAGE_SRC_DIR=\"$(srcdir)\" \
	-DSCRIPTS_DIR=\"$(scriptsdir)\" \
	$(LIBANJUTA_CFLAGS) $(GTK_CFLAGS) $(GLADE_CFLAGS)

# Where to install the plugin
plugindir = $(anjuta_plugin_dir)

# The plugin
plugin_LTLIBRARIES = libpython_plugin.la

# Plugin sources
libpython_plugin_la_SOURCES = plugin.c plugin.h python-assist.c python-assist.h python-utils.c python-utils.h

# Plugin dependencies
libpython_plugin_la_LIBADD = \
	$(LIBANJUTA_LIBS) 

EXTRA_DIST = \
	$(plugin_in_files) \
	$(python_plugin_plugin_DATA) \
	$(python_plugin_ui_DATA) \
	$(python_plugin_glade_DATA) \
	$(python_plugin_pixmaps_DATA)
